﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
using System.Configuration;

namespace Zeus.DAL.LINQ
{
    /// <summary>
    /// 基础Service
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    public class BaseService<TEntity> where TEntity : class
    {
        protected readonly DataContext _context = null;

        public IRepository<TEntity> _session = null;

        public BaseService() {
            _context = new DataContext(ConfigurationManager.ConnectionStrings["DefaultConnectionString"].ToString());
            _session = new LinqRepository<TEntity>(_context);
        }
    }

}
